After installing Python successfully, the next step is to write and run your first Python program. Traditionally, the first program written in any programming language is called the “Hello, World!” program.
Open IDLE, Command Prompt, Terminal, or any code editor and write the following code:
print("Hello, World!")
This is the simplest Python program.
The print() function is used to display output on the screen.
In the program:
When Python executes this program, it displays:
Hello, World!
This means Python has successfully executed your first program.
Python is an interpreted language. This means:
For example:
print("Hello")
print("Babu")
Output:
Hello
Babu
Python executes the first line, then the second line in order.
Python is case-sensitive.
This small program confirms:
It marks the beginning of your programming journey.